<extend name="Base/common"/>
<block name="body">
    <form action="__SELF__" method="POST" class="form-horizontal auth-form" >
         <input type="text" name="uid" value="" placeholder="用户ID"   /><br/><br/>
         <input type="text" name="nickname" value="" placeholder="昵称"   /><br/><br/>
         <input type="radio" name="sex" value="1" placeholder="男" checked="checked" />&nbsp;男&nbsp;
         <input type="radio" name="sex" value="2" placeholder="女"/>&nbsp;女&nbsp;<br/><br/>
         <input type="date" name="birthday" value="" placeholder="生日"   /><br/><br/>
         <input type="text" name="qq" value="" placeholder="qq号"   /><br/><br/>
         <input type="text" name="mobile" value="" placeholder="手机号"   /><br/><br/>
                 <select name="province">
                     <option value="0">省份</option>
                     <volist name="pro" id="vo">
	                    <option value="{$vo.id}" <if condition="$data.province eq $vo[id] ">selected</if> >{$vo.name}</option>                               
                     </volist>
                 </select><br/><br/>
                 <select name="city">
                     <option value="0">城市</option>
                 </select><br/><br/>
		        <select name="district">
		            <option value="0">地区</option>
		        </select><br/><br/>
         <input type="submit" name="go" value="提交" />
    </form>
</block>
<block name="script">
    <script type="text/javascript" src="__STATIC__/qtip/jquery.qtip.min.js"></script>
    <a href="__STATIC__/qtip/jquery.qtip.min.js">a</a>
    <link rel="stylesheet" type="text/css" href="__STATIC__/qtip/jquery.qtip.min.css" media="all">
    <script type="text/javascript" charset="utf-8">
	    $('select[name=province]').change(function() {
	        var child = $(this).val();
	        $.ajax({
	            type: "get",
	            url: "{:U('getChild')}",
	            data: {
	                child: child
	            },

	            dataType: "json",

	            success: function(data) {

	                $("select[name=city]").empty();

	                $("select[name=city]").append("<option value='0'>-市-</option>");

	                for (var i = data.length - 1; i >= 0; i--) {
	                    $("select[name=city]").append("<option value='" + data[i].id + "'>" + data[i].name + "</option>");
	                }
	            }

	        });

	    });
	    $('select[name=city]').change(function() {

	        var child = $(this).val();
	        $.ajax({

	            type: "get",

	            url: "{:U('getChild')}",

	            data: {
	                child: child
	            },

	            dataType: "json",

	            success: function(data) {

	                $("select[name=district]").empty();

	                $("select[name=district]").append("<option value='0'>-区-</option>");

	                for (var i = data.length - 1; i >= 0; i--) {
	                    $("select[name=district]").append("<option value='" + data[i].id + "'>" + data[i].name + "</option>");
	                }
	            }

	        });

	    });
    </script>
</block>